#pragma once

#include <memory>
#include <string>
#include <iostream>

class Subject;

using Subject_ptr = std::shared_ptr<Subject>;

class Observer
{
protected:
    std::string m_state;
    Subject* m_subject_ptr;
    
public:
    Observer() = default;
    virtual ~Observer() = default;

    void SetSubject(Subject &subject) {
        m_subject_ptr = &subject;
    }
    virtual void Update(const std::string &state) = 0;
};

using Observer_ptr = std::shared_ptr<Observer>;
